package com.example.perplonews.a_b_utils

import android.app.Activity
import android.content.Context
import android.util.Log
import android.widget.Toast
import com.blankj.utilcode.util.Utils
import kotlin.coroutines.coroutineContext

class LjlUtils {
    companion object {
        fun Ljl_Loge(string: String) {
            Log.e("ljl", string)
        }

        fun Ljl_Toast(context: Context, string: String) {
            Toast.makeText(context, string, Toast.LENGTH_SHORT).show()
        }

        var ljlsp: String? = "ljlsp"
        fun setSpData( key: String, value: String) {
            var sp = Utils.getApp().getSharedPreferences(ljlsp, 0)
            sp?.edit()?.putString(key, value)?.commit()
        }

        fun getSpData(key: String): String? {
            var sp = Utils.getApp().getSharedPreferences(ljlsp, 0)
            return sp?.getString(key, "")
        }


    }
}